home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 7
/
Aminet 7 - August 1995.iso
/
Aminet
/
comm
/
tcp
/
FtpDaemon.lha
/
ftpd2
/
ftpd.h
< prev
Wrap
C/C++ Source or Header
|
1993-09-08
|
2KB
|
72 lines
#ifndef _MYFTP_H
#define _MYFTP_H 1
#include <setjmp.h>
#include <netinet/in.h>
#ifndef _STDIO_H
#include <stdio.h>
#endif
extern int guest;
extern char *pw;
extern int transflag;
extern int type;
extern long byte_count;
extern int data;
extern jmp_buf errcatch, urgcatch;
extern int logged_in;
extern int askpasswd;
extern int timeout;
extern int maxtimeout;
extern int form;
extern int stru;
extern int mode;
extern int usedefault;
extern int pdata;
extern long file_size;
extern struct sockaddr_in ctrl_addr;
extern struct sockaddr_in data_source;
extern struct sockaddr_in data_dest;
extern struct sockaddr_in his_addr;
extern struct sockaddr_in pasv_addr;
void fatal(char *);
void reply(int,char *,...);
void lreply(int n,char *fmt,...);
void ack(char *s);
void nack(char *s);
void perror_reply(int code,char *string);
void yyerror(char *s);
void end_login(void);
int socketprintf(long socket,char *fmt,...);
int socketstdprintf(char *fmt,...);
int socketvprintf(long socket,char *fmt,va_list args);
int socketputs(long socket,char *s);
int socketputchar(long socket,char c);
void socketflush(long socket);
int socketgetchar(long socket);
extern long server_socket;
// macro's om stdio om te leiden
#undef printf
#define printf socketstdprintf
#undef vprintf
#define vprintf(a,b) socketvprintf(server_socket,(a),(b))
#undef puts
#define puts(a) socketputs(server_socket,(a))
#undef putchar
#define putchar(a) socketputchar(server_socket,(a))
#undef getchar
#define getchar() socketgetchar(server_socket)
#define flush() socketflush(server_socket)
// Overige macro's
#define sleep(a) Delay((a)*50)
#endif /* _MYFTP_H */